var app=getApp();
Page({
  data:{
    radioItems: [
      { name: '小号物柜', deposit:10,rent:20, value: '0',checked: true },
      { name: '中号物柜', deposit: 8, rent: 20,value: '1'  },
      { name: '大型物柜', deposit: 5, rent: 20,value: '2' }
    ],
  },
  onShow:function(){
    app.isLogin();
  },
  onLoad: function () {
  },
  radioChange: function (e) {
    console.log('radio发生change事件，携带value值为：', e.detail.value);

    var radioItems = this.data.radioItems;
    for (var i = 0, len = radioItems.length; i < len; ++i) {
      radioItems[i].checked = radioItems[i].value == e.detail.value;
    }

    this.setData({
      radioItems: radioItems
    });
  },
  pay:function(e){
    this.setData({
      loading: !this.data.loading
    });
    wx.showToast({
      title: '支付成功',
      icon: 'success'
    });
    this.setData({
      loading: !this.data.loading
    });
    wx.navigateTo({
      url: '../../example/list/list',
    })
  },
  back:function(e){
    wx.navigateBack({
      delta: 1,
    })
  }
});